package com.trf.fm1;

/**
 * @author 小小唐
 * @Date 2022/9/16-星期五-19:54
 *
 * 打印字符的ASCII码
 */
public class PrintAscii {

    public void dispAscii(char ch){//dispAscii()方法的功能是为了接收一个字符类型变量，并打印在控制台
        int iTmp = ch;
        System.out.println(ch+"的ASCII码是："+iTmp);
    }

    public static void main(String[] args) {
        PrintAscii printAscii = new PrintAscii();

        printAscii.dispAscii('0');
        printAscii.dispAscii('9');
        printAscii.dispAscii('A');
        printAscii.dispAscii('Z');
        printAscii.dispAscii('a');
        printAscii.dispAscii('z');

    }
}
